The NCDF_LIST routine lists the variables and attributes in a NetCDF file. When calling NCDF_LIST, IDL prints the output directly to the console unless you specify the QUIET keyword.
This routine is written in the IDL language. Its source code can be found in the file NCDF_LIST.pro in the lib subdirectory of the IDL distribution.
In this example, we print the variables and attributes within a NetCDF file:
file = FILEPATH('sample.nc', $
SUBDIRECTORY=['examples','data'])
NCDF_LIST, file, /VARIABLES, /DIMENSIONS, /GATT, /VATT
IDL prints:
C:\Program Files\Exelis\IDL84\examples\data\sample.nc
# dimensions: 3
# Variables: 1
# Global attributes: 3
The unlimited dimension is 2
Dimensions
0 Name: x Size: 512
1 Name: y Size: 768
2 Name: z Size: 0
Global Attributes
0 TITLE: Incredibly Important Data
1 GALAXY: Milky Way
2 PLANET: Earth
Variables and attributes
0 image: BYTE(768,512) = BYTE(y,x)
0 TITLE: New York City
NCDF_LIST, filename, /DIMENSIONS, /GATT, OUT=variable, /QUIET, /VARIABLES, /VATT, VNAME=variable
A string giving the name of the NetCDF file.
Set this keyword to print out the dimensions within the file.
Set this keyword to print out the global attributes.
Set this keyword to a named variable in which to return the output. Note that the output will still be printed unless the QUIET keyword is also set.
Set this keyword to suppress output to the screen.
Set this keyword to print out information about the variables within the file.
Set this keyword to print out the variable attributes for each variable.
Set this keyword to a named variable in which to return a string array containing the variable names.
|
8.4.1 |
Introduced |